package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Customer;
import cn.wolfcode.crm.qo.CustomerQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CustomerMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Customer record);

    Customer selectByPrimaryKey(Long id);

    List<Customer> selectAll();

    int updateByPrimaryKey(Customer record);

    List<Customer> queryForList(CustomerQuery qo);

    String checkTel(String tel);

    Customer checkTelById(@Param("tel") String tel, @Param("id") Long id);

    List<Customer> selectByStatusId(@Param("i") int i, @Param("k") int k);

    void updateStatus(@Param("item") int item, @Param("id") Long id);

    void updateBySellerid(@Param("customerid") Long customerid, @Param("newid") Long newid);

    List<Customer> selectPool(CustomerQuery qo);
}